<link rel="stylesheet" href="<?php echo $img_url; ?>style/css/jquery-ui.css">
<script src="<?php echo $img_url; ?>style/js/FE/jquery-ui.js"></script>
<style>
    .ui-tooltip, .arrow:after {
        background: white;
        border: 2px solid white;
    }
    .ui-tooltip {
        border:3px #666666 solid;
        padding: 10px 20px;
        color: black;
        border-radius: 5px;
        font-family:Arial, Helvetica, sans-serif;
        font-size:12px;
        line-height:20px;
        box-shadow: 0 0 7px gray;
    }
    /*
    .arrow {
    width: 70px;
    height: 16px;
    overflow: hidden;
    position: absolute;
    left: 50%;
    margin-left: -35px;
    bottom: -16px;
    }
    .arrow.top {
    top: -16px;
    bottom: auto;
    }
    .arrow.left {
    left: 20%;
    }
    .arrow:after {
    content: "";
    position: absolute;
    left: 20px;
    top: -20px;
    width: 25px;
    height: 25px;
    box-shadow: 6px 5px 9px -9px red;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    tranform: rotate(45deg);
    }
    .arrow.top:after {
    bottom: -210px;
    top: auto;
    }
    */
</style>

<script>
    var total_faq_1;
    $(function() {
        for (var i = 1; i <= total_faq_1; i++)
        {
            $("#adv_" + i.toString()).tooltip({
                track: true
            });

            $("#adv_" + i.toString()).tooltip("option", "content", $("#adv_reply_" + i.toString()).val());
        }
    });
</script>
<script language="javascript" src="<?php echo $img_url; ?>style/js/FE/fe_adv.js"></script>
<!-- Rao vặt -->
<!-- tin moi nhat -->
<div id="adv-title">
    <span class="title">Rao vặt</span>
    <img src="<?php echo $img_url; ?>style/images/img28.gif">
    <div class="ico-social">
        <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $current_url; ?>&display=popup&ref=plugin" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgfb.gif" width="16" height="16" border="0"></a>
        <a href="https://twitter.com/share" target="_blank"><img src="<?php echo $img_url; ?>style/images/imgtw.gif" width="16" height="16" border="0"></a>
        <a href="https://plus.google.com/share?url=<?php echo $current_url; ?>" target="_blank"><img src="<?php echo $img_url; ?>style/images/imggp.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="return openPopup('contactForm')"><img src="<?php echo $img_url; ?>style/images/imgma.gif" width="16" height="16" border="0"></a>
        <a href="javascript:void(0);" onclick="javascript:window.print();"><img src="<?php echo $img_url; ?>style/images/imgpr.gif" width="16" height="16" border="0"></a>
        <span class="time">
            <?php
            //show date time Tieng Viet
            $str_search = array(
                "Mon",
                "Tue",
                "Wed",
                "Thu",
                "Fri",
                "Sat",
                "Sun"
            );
            $str_replace = array(
                "Th&#7913; hai",
                "Th&#7913; ba",
                "Th&#7913; t&#432;",
                "Th&#7913; n&#259;m",
                "Th&#7913; s&#225;u",
                "Th&#7913; b&#7843;y",
                "Ch&#7911; nh&#7853;t"
            );
            $timenow = gmdate("D, d/m/Y | H:i", time() + 7 * 3600);
            $timenow = str_replace($str_search, $str_replace, $timenow);
            echo $timenow;
            ?>      
        </span>
    </div>
</div>  
<div id="seperator"></div>    
<div id="adv-body">
    <div id="adv-bleft">
        <div id="adv-search">
            <form name="trueform2" id="trueform2" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" onSubmit="return submitSearchAdv('<?php echo $base_url; ?>rao-vat/tim-kiem', 1);">
                <input type="text" value="Nhập rao vặt cần tìm" id="txt_Adv_Keyword" name="txt_Adv_Keyword" class="Adv_Keyword" onfocus="this.value = '';" onblur="if (this.value == '') {
            this.value = 'Nhập rao vặt cần tìm';
        }">
                <select name="cbo_ADV_Cate" id="cbo_ADV_Cate" class="ADV_Cate">
                    <option class="combo_item" value="">-- Chọn chuyên mục --</option>
                    <?php foreach ($aAdvCate as $key => $item): ?>
                        <option class="combo_item" value="<?php echo $item->cate_id; ?>" <?php if (isset($adv_cate_id) && ($adv_cate_id == $item->cate_id)) echo "selected='selected'" ?>><?php echo $item->cate_name; ?></option>
                        <?php
                    endforeach;
                    ?>          
                </select> 
                <select name="cbo_ADV_City" id="cbo_ADV_City" class="ADV_City">
                    <option class="combo_item" value="">-- Chọn Tỉnh/TP --</option>
                    <?php foreach ($aCity as $key => $item): ?>
                        <option class="combo_item" value="<?php echo $item->city_id; ?>" <?php if (isset($city_id) && ($city_id == $item->city_id)) echo "selected='selected'" ?>><?php echo $item->city_name; ?></option>
                        <?php
                    endforeach;
                    ?>
                </select>         
                <input type="hidden" name="isPost" value="1">
                <input type="submit" name="btn_Search" id="btn_Search" value="Tìm kiếm" class="ADV_Post" class="button2" />          
                <input type="button" value="Đăng tin" id="txt_ADV_Post" name="txt_ADV_Post" class="ADV_Post" onClick="window.location = '<?php echo $base_url . "rao-vat/dang-tin"; ?>'">
            </form>
        </div>    
        <div class="clearfix"></div>
        <div id="main_box_1">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Vận chuyển hàng hóa</span>
                <form name="frmMore_1" id="frmMore_1" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_1; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Vận chuyển hàng hóa">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_1');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box1) > 0) {
                    $i = 1;
                    foreach ($aAdv_Box1 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?>  
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div>   
        <div id="main_box_2">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Thủ tục hải quan</span>
                <form name="frmMore_2" id="frmMore_2" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_2; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Thủ tục hải quan">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_2');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box2) > 0) {
                    foreach ($aAdv_Box2 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?> 
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div> 
        <div id="main_box_3">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Kho bãi</span>
                <form name="frmMore_3" id="frmMore_3" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_3; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Kho bãi">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_3');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box3) > 0) {
                    foreach ($aAdv_Box3 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?> 
                <script>
    total_faq_1 = <?php echo $i - 1; ?>;
                </script>            
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div>       
        <div id="main_box_3">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Đóng gói bao bì</span>
                <form name="frmMore_4" id="frmMore_4" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_4; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Đóng gói bao bì">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_4');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box4) > 0) {
                    foreach ($aAdv_Box4 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?> 
                <script>
    total_faq_1 = <?php echo $i - 1; ?>;
                </script>            
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div>  
        <div id="main_box_3">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Bảo hiểm hàng hóa</span>
                <form name="frmMore_5" id="frmMore_5" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_5; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Bảo hiểm hàng hóa">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_5');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box5) > 0) {
                    foreach ($aAdv_Box5 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?> 
                <script>
    total_faq_1 = <?php echo $i - 1; ?>;
                </script>            
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div>  
        <div id="main_box_3">
            <div class="cate-title">
                <img src="<?php echo $img_url; ?>style/images/img7.gif" width="14" height="15"  alt=""/> 
                <span>Loại khác</span>
                <form name="frmMore_6" id="frmMore_6" method="POST" action="<?php echo $base_url; ?>rao-vat/tim-kiem" class="form-search">
                    <input type="hidden" name="txt_Adv_Keyword" value="">
                    <input type="hidden" name="cbo_ADV_Cate" value="<?php echo $ADV_CATE_6; ?>">
                    <input type="hidden" name="isPost" value="1">
                    <input type="hidden" name="cateName" value="Loại khác">
                    <a href="javascript:void(0);" onClick="submitSearch_More('frmMore_6');" class="more">Xem thêm&nbsp;<img src="<?php echo $img_url; ?>style/images/img3.png" alt="" border="0" style="float:none;"/></a>
                </form>
            </div>  
            <ul class="adv-list">
                <?php
                if (count($aAdv_Box6) > 0) {
                    foreach ($aAdv_Box6 as $key => $item):
                        ?>          
                        <li class="col1">
                            <a id="adv_<?php echo $i; ?>" href="<?php echo $base_url . "rao-vat/" . $item->url . "-" . $item->adv_id; ?>.html" title=""><?php echo $item->title; ?></a>
                            <input type="hidden" id="adv_reply_<?php echo $i; ?>" value="<?php echo $item->desc; ?>">
                        </li>
                        <li class="col2"><?php echo date("d/m/Y", strtotime($item->create_date)); ?></li>
                        <li class="col3"><?php
                            foreach ($aCity as $city) {
                                if ($item->city_id == $city->city_id) {
                                    echo $city->city_name;
                                }
                            }
                            ?></li>
                        <?php
                        $i++;
                    endforeach;
                } else {
                    ?>
                    <div class="nodata">Không tìm thấy thông tin.</div>
                    <?php
                }
                ?> 
                <script>
    total_faq_1 = <?php echo $i - 1; ?>;
                </script>            
                <div class="clearfix"></div>   
                <br>                 
            </ul>                
        </div>  
    </div>
    <div class="clearfix"></div>    
</div>  
<br>